Imports VB = Microsoft.VisualBasic
Imports RegistrationKeyDLL.Registration
Imports System
Imports System.io
Public Class RegistrationMain
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Public WithEvents FrmRegistration2 As System.Windows.Forms.GroupBox
    Public WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Panel2 As System.Windows.Forms.Panel
    Friend WithEvents Panel1 As System.Windows.Forms.Panel
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents CmdNext1 As System.Windows.Forms.Button
    Friend WithEvents cmdcancel1 As System.Windows.Forms.Button
    Friend WithEvents cmbonline1 As System.Windows.Forms.Button
    Friend WithEvents cmdonline2 As System.Windows.Forms.Button
    Friend WithEvents cmdnext2 As System.Windows.Forms.Button
    Friend WithEvents cmdcancel2 As System.Windows.Forms.Button
    Friend WithEvents cmdback2 As System.Windows.Forms.Button
    Friend WithEvents cmdregister As System.Windows.Forms.Button
    Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
    Friend WithEvents Timer1 As System.Windows.Forms.Timer
    Friend WithEvents txtcode4 As System.Windows.Forms.TextBox
    Friend WithEvents txtcode3 As System.Windows.Forms.TextBox
    Friend WithEvents txtcode2 As System.Windows.Forms.TextBox
    Friend WithEvents txtCode1 As System.Windows.Forms.TextBox
    Friend WithEvents lblprogress As System.Windows.Forms.Label
    Friend WithEvents lblpercentage As System.Windows.Forms.Label
    Friend WithEvents Panel5 As System.Windows.Forms.Panel
    Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
    Public WithEvents Label1 As System.Windows.Forms.Label
    Public WithEvents Label22 As System.Windows.Forms.Label
    Public WithEvents Label2 As System.Windows.Forms.Label
    Public WithEvents Label23 As System.Windows.Forms.Label
    Public WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents cmdfinish As System.Windows.Forms.Button
    Friend WithEvents LblGenerateCode As System.Windows.Forms.TextBox
    Public WithEvents Label25 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.FrmRegistration2 = New System.Windows.Forms.GroupBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.CmdNext1 = New System.Windows.Forms.Button
        Me.cmdcancel1 = New System.Windows.Forms.Button
        Me.cmbonline1 = New System.Windows.Forms.Button
        Me.Panel2 = New System.Windows.Forms.Panel
        Me.Panel1 = New System.Windows.Forms.Panel
        Me.cmdonline2 = New System.Windows.Forms.Button
        Me.cmdnext2 = New System.Windows.Forms.Button
        Me.cmdcancel2 = New System.Windows.Forms.Button
        Me.cmdback2 = New System.Windows.Forms.Button
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.Label25 = New System.Windows.Forms.Label
        Me.LblGenerateCode = New System.Windows.Forms.TextBox
        Me.lblpercentage = New System.Windows.Forms.Label
        Me.lblprogress = New System.Windows.Forms.Label
        Me.ProgressBar1 = New System.Windows.Forms.ProgressBar
        Me.txtcode4 = New System.Windows.Forms.TextBox
        Me.txtcode3 = New System.Windows.Forms.TextBox
        Me.txtcode2 = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.txtCode1 = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.cmdregister = New System.Windows.Forms.Button
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.Panel5 = New System.Windows.Forms.Panel
        Me.GroupBox5 = New System.Windows.Forms.GroupBox
        Me.Label24 = New System.Windows.Forms.Label
        Me.Label23 = New System.Windows.Forms.Label
        Me.Label22 = New System.Windows.Forms.Label
        Me.Button2 = New System.Windows.Forms.Button
        Me.cmdfinish = New System.Windows.Forms.Button
        Me.FrmRegistration2.SuspendLayout()
        Me.Panel2.SuspendLayout()
        Me.Panel1.SuspendLayout()
        Me.GroupBox1.SuspendLayout()
        Me.Panel5.SuspendLayout()
        Me.GroupBox5.SuspendLayout()
        Me.SuspendLayout()
        '
        'FrmRegistration2
        '
        Me.FrmRegistration2.BackColor = System.Drawing.Color.Lavender
        Me.FrmRegistration2.Controls.Add(Me.Label1)
        Me.FrmRegistration2.Controls.Add(Me.Label2)
        Me.FrmRegistration2.Controls.Add(Me.Label3)
        Me.FrmRegistration2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.FrmRegistration2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.FrmRegistration2.Location = New System.Drawing.Point(24, 1)
        Me.FrmRegistration2.Name = "FrmRegistration2"
        Me.FrmRegistration2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.FrmRegistration2.Size = New System.Drawing.Size(464, 331)
        Me.FrmRegistration2.TabIndex = 4
        Me.FrmRegistration2.TabStop = False
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.AliceBlue
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.Font = New System.Drawing.Font("Times New Roman", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.Color.DarkViolet
        Me.Label1.Location = New System.Drawing.Point(17, 16)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(416, 32)
        Me.Label1.TabIndex = 6
        Me.Label1.Text = "Thank you for purchasing Retail Inventory Manager"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.Color.Transparent
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.ForeColor = System.Drawing.Color.MediumOrchid
        Me.Label2.Location = New System.Drawing.Point(39, 143)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(377, 59)
        Me.Label2.TabIndex = 5
        Me.Label2.Text = "Welcome to the Registration of Retail Inventory Manager"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.Color.AliceBlue
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.Label3.Location = New System.Drawing.Point(4, 288)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(448, 32)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Note :- For further information and help contact Retail Inventory Manager at " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ja" & _
            "cksonthomas2007@gmail.com"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'CmdNext1
        '
        Me.CmdNext1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.CmdNext1.Location = New System.Drawing.Point(312, 336)
        Me.CmdNext1.Name = "CmdNext1"
        Me.CmdNext1.Size = New System.Drawing.Size(88, 21)
        Me.CmdNext1.TabIndex = 0
        Me.CmdNext1.Text = "&Next"
        '
        'cmdcancel1
        '
        Me.cmdcancel1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdcancel1.Location = New System.Drawing.Point(398, 336)
        Me.cmdcancel1.Name = "cmdcancel1"
        Me.cmdcancel1.Size = New System.Drawing.Size(88, 21)
        Me.cmdcancel1.TabIndex = 1
        Me.cmdcancel1.Text = "&Cancel"
        '
        'cmbonline1
        '
        Me.cmbonline1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmbonline1.Location = New System.Drawing.Point(24, 336)
        Me.cmbonline1.Name = "cmbonline1"
        Me.cmbonline1.Size = New System.Drawing.Size(118, 21)
        Me.cmbonline1.TabIndex = 2
        Me.cmbonline1.Text = "Online Registration"
        '
        'Panel2
        '
        Me.Panel2.Controls.Add(Me.cmbonline1)
        Me.Panel2.Controls.Add(Me.CmdNext1)
        Me.Panel2.Controls.Add(Me.cmdcancel1)
        Me.Panel2.Controls.Add(Me.FrmRegistration2)
        Me.Panel2.Location = New System.Drawing.Point(16, 8)
        Me.Panel2.Name = "Panel2"
        Me.Panel2.Size = New System.Drawing.Size(512, 376)
        Me.Panel2.TabIndex = 2
        '
        'Panel1
        '
        Me.Panel1.Controls.Add(Me.cmdonline2)
        Me.Panel1.Controls.Add(Me.cmdnext2)
        Me.Panel1.Controls.Add(Me.cmdcancel2)
        Me.Panel1.Controls.Add(Me.cmdback2)
        Me.Panel1.Controls.Add(Me.GroupBox1)
        Me.Panel1.Location = New System.Drawing.Point(16, 8)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(520, 384)
        Me.Panel1.TabIndex = 3
        Me.Panel1.Visible = False
        '
        'cmdonline2
        '
        Me.cmdonline2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdonline2.Location = New System.Drawing.Point(24, 336)
        Me.cmdonline2.Name = "cmdonline2"
        Me.cmdonline2.Size = New System.Drawing.Size(118, 21)
        Me.cmdonline2.TabIndex = 7
        Me.cmdonline2.Text = "Online Registration"
        '
        'cmdnext2
        '
        Me.cmdnext2.Enabled = False
        Me.cmdnext2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdnext2.Location = New System.Drawing.Point(312, 336)
        Me.cmdnext2.Name = "cmdnext2"
        Me.cmdnext2.Size = New System.Drawing.Size(88, 21)
        Me.cmdnext2.TabIndex = 5
        Me.cmdnext2.Text = "&Next"
        '
        'cmdcancel2
        '
        Me.cmdcancel2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdcancel2.Location = New System.Drawing.Point(398, 336)
        Me.cmdcancel2.Name = "cmdcancel2"
        Me.cmdcancel2.Size = New System.Drawing.Size(88, 21)
        Me.cmdcancel2.TabIndex = 6
        Me.cmdcancel2.Text = "&Cancel"
        '
        'cmdback2
        '
        Me.cmdback2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdback2.Location = New System.Drawing.Point(225, 336)
        Me.cmdback2.Name = "cmdback2"
        Me.cmdback2.Size = New System.Drawing.Size(88, 21)
        Me.cmdback2.TabIndex = 8
        Me.cmdback2.Text = "&Back"
        '
        'GroupBox1
        '
        Me.GroupBox1.BackColor = System.Drawing.Color.Lavender
        Me.GroupBox1.Controls.Add(Me.Label25)
        Me.GroupBox1.Controls.Add(Me.LblGenerateCode)
        Me.GroupBox1.Controls.Add(Me.lblpercentage)
        Me.GroupBox1.Controls.Add(Me.lblprogress)
        Me.GroupBox1.Controls.Add(Me.ProgressBar1)
        Me.GroupBox1.Controls.Add(Me.txtcode4)
        Me.GroupBox1.Controls.Add(Me.txtcode3)
        Me.GroupBox1.Controls.Add(Me.txtcode2)
        Me.GroupBox1.Controls.Add(Me.Label4)
        Me.GroupBox1.Controls.Add(Me.Label7)
        Me.GroupBox1.Controls.Add(Me.txtCode1)
        Me.GroupBox1.Controls.Add(Me.Label8)
        Me.GroupBox1.Controls.Add(Me.Label9)
        Me.GroupBox1.Controls.Add(Me.cmdregister)
        Me.GroupBox1.Location = New System.Drawing.Point(24, 1)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(456, 327)
        Me.GroupBox1.TabIndex = 1
        Me.GroupBox1.TabStop = False
        '
        'Label25
        '
        Me.Label25.BackColor = System.Drawing.Color.Transparent
        Me.Label25.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label25.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label25.ForeColor = System.Drawing.Color.Brown
        Me.Label25.Location = New System.Drawing.Point(24, 200)
        Me.Label25.Name = "Label25"
        Me.Label25.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label25.Size = New System.Drawing.Size(416, 15)
        Me.Label25.TabIndex = 18
        Me.Label25.Text = "Important : Don't Close this Window Before getting the Registration Key..."
        Me.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'LblGenerateCode
        '
        Me.LblGenerateCode.BackColor = System.Drawing.Color.White
        Me.LblGenerateCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.LblGenerateCode.Location = New System.Drawing.Point(160, 85)
        Me.LblGenerateCode.Name = "LblGenerateCode"
        Me.LblGenerateCode.ReadOnly = True
        Me.LblGenerateCode.Size = New System.Drawing.Size(222, 20)
        Me.LblGenerateCode.TabIndex = 17
        '
        'lblpercentage
        '
        Me.lblpercentage.Location = New System.Drawing.Point(280, 272)
        Me.lblpercentage.Name = "lblpercentage"
        Me.lblpercentage.Size = New System.Drawing.Size(168, 16)
        Me.lblpercentage.TabIndex = 16
        '
        'lblprogress
        '
        Me.lblprogress.Location = New System.Drawing.Point(24, 272)
        Me.lblprogress.Name = "lblprogress"
        Me.lblprogress.Size = New System.Drawing.Size(256, 16)
        Me.lblprogress.TabIndex = 15
        '
        'ProgressBar1
        '
        Me.ProgressBar1.Location = New System.Drawing.Point(24, 288)
        Me.ProgressBar1.Name = "ProgressBar1"
        Me.ProgressBar1.Size = New System.Drawing.Size(400, 16)
        Me.ProgressBar1.Step = 2
        Me.ProgressBar1.TabIndex = 14
        Me.ProgressBar1.Visible = False
        '
        'txtcode4
        '
        Me.txtcode4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtcode4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtcode4.Location = New System.Drawing.Point(330, 168)
        Me.txtcode4.MaxLength = 3
        Me.txtcode4.Name = "txtcode4"
        Me.txtcode4.Size = New System.Drawing.Size(55, 22)
        Me.txtcode4.TabIndex = 13
        Me.txtcode4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'txtcode3
        '
        Me.txtcode3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtcode3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtcode3.Location = New System.Drawing.Point(273, 168)
        Me.txtcode3.MaxLength = 3
        Me.txtcode3.Name = "txtcode3"
        Me.txtcode3.Size = New System.Drawing.Size(55, 22)
        Me.txtcode3.TabIndex = 12
        Me.txtcode3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'txtcode2
        '
        Me.txtcode2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtcode2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtcode2.Location = New System.Drawing.Point(217, 168)
        Me.txtcode2.MaxLength = 3
        Me.txtcode2.Name = "txtcode2"
        Me.txtcode2.Size = New System.Drawing.Size(55, 22)
        Me.txtcode2.TabIndex = 11
        Me.txtcode2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.Location = New System.Drawing.Point(24, 168)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(134, 13)
        Me.Label4.TabIndex = 9
        Me.Label4.Text = "Enter Registration Key"
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.Color.Transparent
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label7.Location = New System.Drawing.Point(40, 112)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(408, 40)
        Me.Label7.TabIndex = 8
        Me.Label7.Text = "Send this Serial Number to jacksonthomas2007@gmail.com or SMS to +965 69392998 an" & _
            "d collect the registration code for Finishing Setup"
        '
        'txtCode1
        '
        Me.txtCode1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtCode1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtCode1.Location = New System.Drawing.Point(160, 168)
        Me.txtCode1.MaxLength = 3
        Me.txtCode1.Name = "txtCode1"
        Me.txtCode1.Size = New System.Drawing.Size(55, 22)
        Me.txtCode1.TabIndex = 2
        Me.txtCode1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label8.Location = New System.Drawing.Point(24, 88)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(136, 13)
        Me.Label8.TabIndex = 1
        Me.Label8.Text = "System Generate Code"
        '
        'Label9
        '
        Me.Label9.Font = New System.Drawing.Font("Times New Roman", 14.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label9.Location = New System.Drawing.Point(8, 16)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(416, 24)
        Me.Label9.TabIndex = 0
        Me.Label9.Text = "Software Registration "
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'cmdregister
        '
        Me.cmdregister.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdregister.Location = New System.Drawing.Point(160, 232)
        Me.cmdregister.Name = "cmdregister"
        Me.cmdregister.Size = New System.Drawing.Size(128, 21)
        Me.cmdregister.TabIndex = 9
        Me.cmdregister.Text = "&Register"
        '
        'Timer1
        '
        '
        'Panel5
        '
        Me.Panel5.Controls.Add(Me.GroupBox5)
        Me.Panel5.Controls.Add(Me.Button2)
        Me.Panel5.Controls.Add(Me.cmdfinish)
        Me.Panel5.Location = New System.Drawing.Point(16, 8)
        Me.Panel5.Name = "Panel5"
        Me.Panel5.Size = New System.Drawing.Size(536, 400)
        Me.Panel5.TabIndex = 11
        Me.Panel5.Visible = False
        '
        'GroupBox5
        '
        Me.GroupBox5.Controls.Add(Me.Label24)
        Me.GroupBox5.Controls.Add(Me.Label23)
        Me.GroupBox5.Controls.Add(Me.Label22)
        Me.GroupBox5.Location = New System.Drawing.Point(23, 1)
        Me.GroupBox5.Name = "GroupBox5"
        Me.GroupBox5.Size = New System.Drawing.Size(465, 331)
        Me.GroupBox5.TabIndex = 0
        Me.GroupBox5.TabStop = False
        '
        'Label24
        '
        Me.Label24.BackColor = System.Drawing.Color.AliceBlue
        Me.Label24.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label24.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label24.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.Label24.Location = New System.Drawing.Point(8, 288)
        Me.Label24.Name = "Label24"
        Me.Label24.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label24.Size = New System.Drawing.Size(448, 32)
        Me.Label24.TabIndex = 6
        Me.Label24.Text = "Note :- For further information and help contact Retail Inventory Manager at " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ja" & _
            "cksonthomas2007@gmail.com"
        Me.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label23
        '
        Me.Label23.BackColor = System.Drawing.Color.Transparent
        Me.Label23.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label23.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label23.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.Label23.Location = New System.Drawing.Point(56, 132)
        Me.Label23.Name = "Label23"
        Me.Label23.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label23.Size = New System.Drawing.Size(353, 57)
        Me.Label23.TabIndex = 5
        Me.Label23.Text = "You have successfully completed the Registration "
        Me.Label23.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Label22
        '
        Me.Label22.BackColor = System.Drawing.Color.Transparent
        Me.Label22.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label22.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label22.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label22.Location = New System.Drawing.Point(16, 24)
        Me.Label22.Name = "Label22"
        Me.Label22.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label22.Size = New System.Drawing.Size(425, 33)
        Me.Label22.TabIndex = 4
        Me.Label22.Text = "Thank you for purchasing Inventory Manager SOFTWARE"
        Me.Label22.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Button2
        '
        Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Button2.Location = New System.Drawing.Point(24, 336)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(118, 21)
        Me.Button2.TabIndex = 8
        Me.Button2.Text = "Online Registration"
        '
        'cmdfinish
        '
        Me.cmdfinish.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdfinish.Location = New System.Drawing.Point(398, 336)
        Me.cmdfinish.Name = "cmdfinish"
        Me.cmdfinish.Size = New System.Drawing.Size(88, 21)
        Me.cmdfinish.TabIndex = 7
        Me.cmdfinish.Text = "&Finish"
        '
        'RegistrationMain
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.Color.Lavender
        Me.ClientSize = New System.Drawing.Size(562, 423)
        Me.ControlBox = False
        Me.Controls.Add(Me.Panel1)
        Me.Controls.Add(Me.Panel2)
        Me.Controls.Add(Me.Panel5)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "RegistrationMain"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Software Registration"
        Me.FrmRegistration2.ResumeLayout(False)
        Me.Panel2.ResumeLayout(False)
        Me.Panel1.ResumeLayout(False)
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        Me.Panel5.ResumeLayout(False)
        Me.GroupBox5.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region
    Dim Reg_Code_Demo As String
    Dim Reg_Code_Full As String
    Dim Reg_Code_Generate As String
    Dim Generate_Code1 As String
    Dim Generate_Code2 As String
    Dim Generate_Code3 As String
    Dim Generate_Code4 As String
    Dim version As Boolean
    Dim Software_Version As Boolean
    Private Sub cmdnext2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdnext2.Click
        Panel1.Visible = False
        Panel2.Visible = False
        Panel5.Visible = True
    End Sub
    Private Sub cmdback2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdback2.Click
        Panel1.Visible = False
        Panel2.Visible = True
    End Sub

    Private Sub CmdNext1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdNext1.Click
        Panel2.Visible = False
        Panel1.Visible = True
        If LblGenerateCode.Text = "" Then
            LblGenerateCode.Text = FindSerialNumbers()
        End If
        txtCode1.Focus()
    End Sub
    Sub GenerateCode_Sep()
        Generate_Code1 = Mid(LblGenerateCode.Text, 1, 6)
        Generate_Code2 = Mid(LblGenerateCode.Text, 8, 6)
        Generate_Code3 = Mid(LblGenerateCode.Text, 15, 6)
        Generate_Code4 = Mid(LblGenerateCode.Text, 22, 6)
    End Sub

    Private Sub cmdregister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdregister.Click
        Call GenerateCode_Sep()
        Try
            version = False
            Reg_Code_Demo = Generate_RegistrationKey(Generate_Code1, Generate_Code2, Generate_Code3, Generate_Code4, version, 733)
            version = True
            Reg_Code_Full = Generate_RegistrationKey(Generate_Code1, Generate_Code2, Generate_Code3, Generate_Code4, version, 733)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Reg_Code_Generate = txtCode1.Text & txtcode2.Text & txtcode3.Text & txtcode4.Text
        If StrComp(Reg_Code_Demo, Reg_Code_Generate) = 0 Then
            ProgressBar1.Visible = True
            Timer1.Start()
            cmdregister.Enabled = False
            Software_Version = False
        ElseIf StrComp(Reg_Code_Full, Reg_Code_Generate) = 0 Then
            ProgressBar1.Visible = True
            Timer1.Start()
            cmdregister.Enabled = False
            Software_Version = True
        Else
            MsgBox("Registration Fails...", MsgBoxStyle.Critical, "Inventory Manager")
            txtCode1.Focus()
        End If
    End Sub

    Private Sub txtCode1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCode1.TextChanged
        If Len(txtCode1.Text) = 3 Then
            txtcode2.Focus()
        End If
    End Sub

    Private Sub txtcode2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcode2.TextChanged
        If Len(txtcode2.Text) = 3 Then
            txtcode3.Focus()
        End If
    End Sub

    Private Sub txtcode3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcode3.TextChanged
        If Len(txtcode3.Text) = 3 Then
            txtcode4.Focus()
        End If
    End Sub
    Dim i As Integer
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Value = ProgressBar1.Value + 1
        i += 1
        lblpercentage.Text = i & " % Completed"
        If i < 30 Then
            lblprogress.Text = "Registration Starts... "
        ElseIf i >= 30 And i < 70 Then
            lblprogress.Text = "Load DataBase..."
        ElseIf i >= 70 Then
            lblprogress.Text = "Varifying Files..."
        End If
        If ProgressBar1.Value = ProgressBar1.Maximum Then
            Timer1.Stop()
            MsgBox("Registered Successfully,Click Next to Continue...", MsgBoxStyle.Information, "Inventory Manager")
            cmdnext2.Enabled = True
            ProgressBar1.Visible = False
            lblprogress.Text = ""
            lblpercentage.Text = ""
            ProgressBar1.Value = 0
            cmdregister.Enabled = False
        End If
    End Sub

    Private Sub cmdcancel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcancel2.Click
        Call Cancel()
    End Sub

    Private Sub cmdback3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Panel1.Visible = True
    End Sub
    Sub Cancel()
        If MsgBox("Do You Really want to exit from Registration wizard..", MsgBoxStyle.Critical + MsgBoxStyle.YesNo, "Registration Wizard") = MsgBoxResult.Yes Then
            Application.Exit()
        End If
    End Sub

    Private Sub cmdcancel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdcancel1.Click
        Call Cancel()
    End Sub

    Private Sub cmdcancel3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Call Cancel()
    End Sub

    Private Sub cmdsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If validation() = True Then Exit Sub
        MsgBox("Click Next to Continue...", MsgBoxStyle.Information, "Inventory Manager")
    End Sub
    Private Function validation() As Boolean
    End Function
    Private Function Validation1() As Boolean

    End Function

    Private Sub cmdcancel4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Call Cancel()
    End Sub
   
    Private Sub cmdnext4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Panel5.Visible = True
    End Sub
    Private Sub cmdok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If Validation1() = True Then Exit Sub
    End Sub

    Private Sub cmdfinish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdfinish.Click
        Try

            Call Create_Security_Files(Application.StartupPath, 733)
            Me.Close()
            Application.Exit()
           
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Inventory Manager")
        End Try
    End Sub

    Private Declare Function GetWindowsDirectory Lib "kernel32.dll" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    Public Function GetTheWindowsDirectory() As String
        Dim strWindowsDir As String        ' Variable to return the path of Windows Directory
        Dim lngWindowsDirLength As Long    ' Variable to return the the lenght of the path
        strWindowsDir = Space(250)     ' Initilize the buffer to receive the string
        lngWindowsDirLength = GetWindowsDirectory(strWindowsDir, 250) ' Read the path of the windows directory
        strWindowsDir = VB.Left(strWindowsDir, lngWindowsDirLength) ' Extract the windows path from the buffer
        GetTheWindowsDirectory = strWindowsDir
    End Function

    
End Class
